<template>
  <!-- 更多作品 -->
  <div class="work" v-if="recommendList && recommendList.length">
    <div class="part-title">{{ info.user && info.user.nickname }}的其他内容</div>
    <left-img :list="recommendList"></left-img>
    <div class="seeall" v-app-jump="{ to: `mtjimu://works?id=${info.workId}` }">查看更多内容</div>
  </div>
</template>

<script>
  import LeftImg from 'comp/LeftImg';
  export default {
    props: {
      info: {
        type: Object,
      },
    },
    data() {
      return {
        recommendList: [],
      };
    },
    components: {
      LeftImg,
    },
    created() {},
    watch: {},
    created() {},
    computed: {},
    mounted() {
      this.getWorkRecom();
    },
    methods: {
      getWorkRecom() {
        this.$service
          .SquareUserRecommend({
            uuid: this.info.user.uuid,
            workId: this.info.workId,
          })
          .then((res) => {
            this.recommendList = res;
          })
          .catch((err) => {
            console.log('推荐作品获取失败', err);
          });
      },
    },
  };
</script>
<style lang="less">
  .work {
    padding-top: 1rem;
    .left-img-right-text-item {
      margin-bottom: 2rem;

      .cover-img {
        width: 14rem;
        height: 8rem;
        margin-right: 1rem;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .title {
        font-size: 1.4rem;
        line-height: 1.4;
      }

      .right {
        .category {
          font-size: 1.2rem;
          line-height: 1.4;
        }
      }
    }
  }
</style>
